// 引入验证器
const { contentValidator } = require('../validators/comment.validator')
const {addComment, delComment, getComment ,goGood} = require('../service/comment.service')
module.exports = {
    // 添加评论
    addComment: async (ctx, next)=> {
        if (contentValidator(ctx)) { 
            await addComment(ctx)
        }
    },
    delComment: async (ctx, next)=> {
        await delComment(ctx)
    },
    getComment: async (ctx, next)=> {
        await getComment(ctx)
    },
    goGood: async (ctx, next)=> {
        await goGood(ctx)
    },
}